package com.weina.dao;

import com.weina.entity.Employee;
import com.weina.vo.EmployeeVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    /**
     * 根据员工账号查询员工信息
     */
    Employee findEmployeeByLoginName(String loginName);

    int getEmployeeCountByRoleId(Integer id);

    List<Employee> findAllEmployee(EmployeeVo employeeVo);

    int addEmployee(Employee employee);

    int updateEmployee(Employee employee);

    int deleteEmployee(Integer id);

    void deleteEmployeeAndRole(Integer id);

    void addEmployeeRole(@Param("rid") String roleId,@Param("eid") Integer empId);
}
